package com.probiz.estore.attribute.service;

import java.util.List;

import net.sf.json.JSONObject;

import com.probiz.estore.common.model.attribute.Attribute;
import com.probiz.estore.core.service.GenericManager;

/**
 * Manager interface for Attribute, responsible for business processing, and communicate between web and persistence layer.
 *
 */
public interface AttributeManager extends GenericManager<Attribute> {
	/**
	 * 根据属性编码获得属性
	 * @param attributeCode
	 * @return
	 */
	public Attribute getAttributeByCode(String attributeCode);
	
	/**
	 * 根据模块获得所有属性
	 * @param attributeType
	 * @return
	 */
	public List<Attribute> getAttributes(Short attributeType);
	/**
	 * 根据模块获得所有激活属性
	 * @param attributeType
	 * @return
	 */
	public List<Attribute> getActiveAttributes(Short attributeType);
	
	/**
	 * 完全保存方法
	 * @param attribute
	 */
	public void saveFully(Attribute attribute);
	/**
	 * 将attribute对象转换为JSON对象
	 * @param attribute
	 * @return
	 */
	public JSONObject getJSONObject(Attribute attribute);
	
	
}
